package org.foj.service;

import org.foj.model.Issue;
//import org.springframework.flex.remoting.RemotingDestination;
//import org.springframework.flex.remoting.RemotingInclude;
import org.springframework.flex.remoting.RemotingDestination;
import org.springframework.flex.remoting.RemotingInclude;
import org.springframework.security.annotation.Secured;

import javax.jws.WebService;

@WebService
@RemotingDestination(channels = {"my-amf"})
public interface IssueManager {

  @RemotingInclude
  java.util.List<Issue> getAll();

  @RemotingInclude
  Issue get(Long id);

  @Secured({"ROLE_USER", "ROLE_ADMIN"})
  @RemotingInclude
  Issue save(Issue issue);

  @Secured({"ROLE_ADMIN"})
  @RemotingInclude
  void remove(Long id);

}
